package com.xtpt.disaster.bean;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Component
@ApiModel(description = "文件节点用户")
public class NodeInfo implements Serializable {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long nodeId;

    private String nodeHostname;

    private String nodeIp;

    private Integer nodePort;

    private String nodeUsername;

    private String nodePasswd;

    private Integer osType;

    private Date createTime;

    private Date updateTime;

    public NodeInfo() {
    }

    public NodeInfo(Long nodeId, String nodeHostname, String nodeIp, Integer nodePort, String nodeUsername, String nodePasswd, Integer osType, Date createTime, Date updateTime) {
        this.nodeId = nodeId;
        this.nodeHostname = nodeHostname;
        this.nodeIp = nodeIp;
        this.nodePort = nodePort;
        this.nodeUsername = nodeUsername;
        this.nodePasswd = nodePasswd;
        this.osType = osType;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public NodeInfo(Long nodeId, String nodeIp, Integer nodePort, String nodeUsername, String nodePasswd, Integer osType) {
        this.nodeId = nodeId;
        this.nodeIp = nodeIp;
        this.nodePort = nodePort;
        this.nodeUsername = nodeUsername;
        this.nodePasswd = nodePasswd;
        this.osType = osType;
    }

    public Integer getNodePort() {
        return nodePort;
    }

    public void setNodePort(Integer nodePort) {
        this.nodePort = nodePort;
    }

    public Long getNodeId() {
        return nodeId;
    }

    public void setNodeId(Long nodeId) {
        this.nodeId = nodeId;
    }

    public String getNodeIp() {
        return nodeIp;
    }

    public void setNodeIp(String nodeIp) {
        this.nodeIp = nodeIp;
    }

    public String getNodeUsername() {
        return nodeUsername;
    }

    public void setNodeUsername(String nodeUsername) {
        this.nodeUsername = nodeUsername;
    }

    public String getNodePasswd() {
        return nodePasswd;
    }

    public void setNodePasswd(String nodePasswd) {
        this.nodePasswd = nodePasswd;
    }

    public Integer getOsType() {
        return osType;
    }

    public void setOsType(Integer osType) {
        this.osType = osType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getNodeHostname() {
        return nodeHostname;
    }

    public void setNodeHostname(String nodeHostname) {
        this.nodeHostname = nodeHostname;
    }

    @Override
    public String toString() {
        return "NodeInfo{" +
                "nodeId=" + nodeId +
                ", nodeHostname='" + nodeHostname + '\'' +
                ", nodeIp='" + nodeIp + '\'' +
                ", nodePort=" + nodePort +
                ", nodeUsername='" + nodeUsername + '\'' +
                ", nodePasswd='" + nodePasswd + '\'' +
                ", osType=" + osType +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}